#include <stdio.h>
#include "lexical.h"
#include "error.h"
#include "parser.h"


int main(int argc, const char *argv[])
{
    if (argc < 2)
        return -1;
    FILE *file  = fopen(argv[1], "r");
    if(!file) {
        printf("文件打开失败\n");
        return -2;
    }
    scanner_set_file_and_name(file, argv[1]);
    check_symbol_num();
    syntax_analyse();

    return 0;
}



